import userModel from './models/user';
import commonModel from './models/common';
import homeModel from './models/home';
import categroyModel from './models/categroy';

import {create} from 'dva-core';

const models = [userModel, commonModel, homeModel, categroyModel];

const app = create();

models.forEach(i => {
  // 装载models对象
  app.model(i);
});

app.start(); // 实例初始化

const store = app._store; // 获取redux的store对象供react-redux使用
export default store;
